package com.haopt.annotation.obtain;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author haopt
 * @version 1.0
 * @ClassName ValueConfig
 * @Description TODO
 * @date 2021/5/11 23:20
 */
@RestController
public class ValueController {

    @Value("${data.name}")
    private String name;

    @Autowired
    private Haopt haopt;

    @Autowired
    private Student student;

    @GetMapping("/value")
    public void testValue(){
        System.out.println(name);
    }

    @GetMapping("/haopt")
    public void haopt(){
        System.out.println(haopt);
    }

    @GetMapping("/student")
    public void student(){
        System.out.println(student);
    }


}
